import { PayloadAction, createSlice } from '@reduxjs/toolkit';
import { fetchBallsSlice } from './balls.actions';


const initialState = {
	items: []
};

export const ballsSlice = createSlice({
	name:  'balls',
	initialState,
	reducers: {

	},
	extraReducers: (builder) => {
		builder.addCase(fetchBallsSlice.fulfilled, (state, action) => {
			state.items = action.payload;
		});
	}
});

export default ballsSlice.reducer;
// export const userActions = userSlice.actions;